home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / mcr3.c < prev    next >
C/C++ Source or Header  |  2000-05-13  |  73KB  |  2,134 lines

  1. /***************************************************************************
  2.  
  3.     Midway MCR-3 system
  4.  
  5.     Currently implemented:
  6.         * Tapper
  7.         * Timber
  8.         * Discs of Tron (Squawk n' Talk)
  9.         * Destruction Derby (Turbo Chip Squeak)
  10.  
  11.     Spy Hunter games (MCR3 with scrolling):
  12.         * Spy Hunter (Chip Squeak Deluxe)
  13.         * Turbo Tag (prototype) (Chip Squeak Deluxe)
  14.         * Crater Raider
  15.  
  16.     MCR Monoboard games (MCR3 with a slightly different memory map):
  17.         * Destruction Derby (Monoboard version) (Turbo Chip Squeak)
  18.         * Sarge (Turbo Chip Squeak)
  19.         * Rampage (Sounds Good)
  20.         * Power Drive (Sounds Good)
  21.         * Max RPM (Turbo Chip Squeak)
  22.  
  23. ****************************************************************************
  24.  
  25.     Memory map
  26.  
  27. ****************************************************************************
  28.  
  29.     ========================================================================
  30.     CPU #1
  31.     ========================================================================
  32.     0000-DFFF   R     xxxxxxxx    Program ROM
  33.     E000-E7FF   R/W   xxxxxxxx    NVRAM
  34.     E800-E9FF   R/W   xxxxxxxx    Sprite RAM
  35.     F000-F7FF   R/W   xxxxxxxx    Background video RAM
  36.     F800-F8FF     W   xxxxxxxx    Palette RAM
  37.     ========================================================================
  38.     0000        R     x-xxxxxx    Input ports
  39.                 R     x-------    Service switch (active low)
  40.                 R     --x-----    Tilt
  41.                 R     ---xxx--    External inputs
  42.                 R     ------x-    Right coin
  43.                 R     -------x    Left coin
  44.     0000        W     xxxxxxxx    Data latch OP0 (coin meters, 2 led's and cocktail 'flip')
  45.     0001        R     xxxxxxxx    External inputs
  46.     0002        R     xxxxxxxx    External inputs
  47.     0003        R     xxxxxxxx    DIP switches
  48.     0004        R     xxxxxxxx    External inputs
  49.     0004        W     xxxxxxxx    Data latch OP4 (comm. with external hardware)
  50.     0007        R     xxxxxxxx    Audio status
  51.     001C-001F   W     xxxxxxxx    Audio latches 1-4
  52.     00E0        W     --------    Watchdog reset
  53.     00E8        W     xxxxxxxx    Unknown (written at initialization time)
  54.     00F0-00F3   W     xxxxxxxx    CTC communications
  55.     ========================================================================
  56.     Interrupts:
  57.         NMI ???
  58.         INT generated by CTC
  59.     ========================================================================
  60.  
  61.  
  62.     ========================================================================
  63.     CPU #2 (Super Sound I/O)
  64.     ========================================================================
  65.     0000-3FFF   R     xxxxxxxx    Program ROM
  66.     8000-83FF   R/W   xxxxxxxx    Program RAM
  67.     9000-9003   R     xxxxxxxx    Audio latches 1-4
  68.     A000          W   xxxxxxxx    AY-8910 #1 control
  69.     A001        R     xxxxxxxx    AY-8910 #1 status
  70.     A002          W   xxxxxxxx    AY-8910 #1 data
  71.     B000          W   xxxxxxxx    AY-8910 #2 control
  72.     B001        R     xxxxxxxx    AY-8910 #2 status
  73.     B002          W   xxxxxxxx    AY-8910 #2 data
  74.     C000          W   xxxxxxxx    Audio status
  75.     E000          W   xxxxxxxx    Unknown
  76.     F000        R     xxxxxxxx    Audio board switches
  77.     ========================================================================
  78.     Interrupts:
  79.         NMI ???
  80.         INT generated by external circuitry 780 times/second
  81.     ========================================================================
  82.  
  83. ***************************************************************************/
  84.  
  85.  
  86. #include "driver.h"
  87. #include "machine/mcr.h"
  88. #include "machine/z80fmly.h"
  89. #include "sndhrdw/mcr.h"
  90. #include "vidhrdw/generic.h"
  91.  
  92.  
  93. /* external video code and data */
  94. extern UINT8 spyhunt_sprite_color_mask;
  95. extern INT16 spyhunt_scroll_offset;
  96. extern UINT8 spyhunt_draw_lamps;
  97. extern UINT8 spyhunt_lamp[8];
  98.  
  99. extern UINT8 *spyhunt_alpharam;
  100. extern size_t spyhunt_alpharam_size;
  101.  
  102. WRITE_HANDLER( mcr3_videoram_w );
  103. WRITE_HANDLER( mcr3_paletteram_w );
  104.  
  105. void mcr3_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  106.  
  107. void mcrmono_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  108.  
  109. void dotron_change_light(int light);
  110. int dotron_vh_start(void);
  111. void dotron_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  112.  
  113. void spyhunt_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  114. int spyhunt_vh_start(void);
  115. void spyhunt_vh_stop(void);
  116. void spyhunt_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  117.  
  118.  
  119.  
  120. /*************************************
  121.  *
  122.  *    Local variables and tables
  123.  *
  124.  *************************************/
  125.  
  126. static UINT8 input_mux;
  127. static UINT8 maxrpm_last_shift;
  128. static INT8 maxrpm_p1_shift;
  129. static INT8 maxrpm_p2_shift;
  130.  
  131. /* Translation table for one-joystick emulation */
  132. static const UINT8 one_joy_trans[16] =
  133. {
  134.     0x00,0x05,0x0A,0x00,0x06,0x04,0x08,0x00,
  135.     0x09,0x01,0x02,0x00,0x00,0x00,0x00,0x00
  136. };
  137.  
  138.  
  139.  
  140. /*************************************
  141.  *
  142.  *    Discs of Tron input ports
  143.  *
  144.  *************************************/
  145.  
  146. static int dotron_interrupt(void)
  147. {
  148.     /* pulse the CTC line 2 to enable Platform Poles */
  149.     z80ctc_0_trg2_w(0, 1);
  150.     z80ctc_0_trg2_w(0, 0);
  151.     return mcr_interrupt();
  152. }
  153.  
  154.  
  155. static READ_HANDLER( dotron_port_2_r )
  156. {
  157.     static char lastfake = 0;
  158.     static int mask = 0x00FF;
  159.     static int count = 0;
  160.     static int delta = 0;
  161.     int data;
  162.     char fake;
  163.  
  164.     /* remap up and down on the mouse to aim up and down */
  165.     data = input_port_2_r(offset);
  166.     fake = input_port_6_r(offset);
  167.  
  168.     delta += (fake - lastfake);
  169.     lastfake = fake;
  170.  
  171.     /* Map to "aim up" */
  172.     if (delta > 5)
  173.     {
  174.         mask = 0x00EF;
  175.         count = 5;
  176.         delta = 0;
  177.     }
  178.  
  179.     /* Map to "aim down" */
  180.     else if (delta < -5)
  181.     {
  182.         mask = 0x00DF;
  183.         count = 5;
  184.         delta = 0;
  185.     }
  186.  
  187.     if ((count--) <= 0)
  188.     {
  189.         count = 0;
  190.         mask = 0x00FF;
  191.     }
  192.  
  193.     data &= mask;
  194.  
  195.     return data;
  196. }
  197.  
  198.  
  199. static WRITE_HANDLER( dotron_port_4_w )
  200. {
  201.     /* light control is in the top 2 bits */
  202.     dotron_change_light(data >> 6);
  203.  
  204.     /* low 5 bits go to control the Squawk & Talk */
  205.     squawkntalk_data_w(offset, data);
  206. }
  207.  
  208.  
  209.  
  210. /*************************************
  211.  *
  212.  *    Sarge input ports
  213.  *
  214.  *************************************/
  215.  
  216. static READ_HANDLER( sarge_port_1_r )
  217. {
  218.     return readinputport(1) & ~one_joy_trans[readinputport(6) & 0x0f];
  219. }
  220.  
  221.  
  222. static READ_HANDLER( sarge_port_2_r )
  223. {
  224.     return readinputport(2) & ~one_joy_trans[(readinputport(6) >> 4) & 0x0f];
  225. }
  226.  
  227.  
  228.  
  229. /*************************************
  230.  *
  231.  *    Power Drive input ports
  232.  *
  233.  *************************************/
  234.  
  235. static int powerdrv_interrupt(void)
  236. {
  237.     /* pulse the CTC line 2 periodically */
  238.     z80ctc_0_trg2_w(0, 1);
  239.     z80ctc_0_trg2_w(0, 0);
  240.  
  241.     if (cpu_getiloops() == 0)
  242.         return mcr_interrupt();
  243.     else
  244.         return ignore_interrupt();
  245. }
  246.  
  247.  
  248. static READ_HANDLER( powerdrv_port_2_r )
  249. {
  250.     int result = input_port_2_r(offset) & 0x7f;
  251.     return result | (input_mux & 0x80);
  252. }
  253.  
  254.  
  255. static WRITE_HANDLER( powerdrv_port_7_w )
  256. {
  257.     /* use input_mux for scratch */
  258.     input_mux = ~input_mux & 0x80;
  259. }
  260.  
  261.  
  262.  
  263. /*************************************
  264.  *
  265.  *    Max RPM input ports
  266.  *
  267.  *************************************/
  268.  
  269. static WRITE_HANDLER( maxrpm_mux_w )
  270. {
  271.     input_mux = (data >> 1) & 3;
  272. }
  273.  
  274.  
  275. static READ_HANDLER( maxrpm_port_1_r )
  276. {
  277.     /* multiplexed steering wheel/gas pedal */
  278.     return readinputport(6 + input_mux);
  279. }
  280.  
  281.  
  282. static READ_HANDLER( maxrpm_port_2_r )
  283. {
  284.     static const UINT8 shift_bits[5] = { 0x00, 0x05, 0x06, 0x01, 0x02 };
  285.     UINT8 start = readinputport(0);
  286.     UINT8 shift = readinputport(10);
  287.  
  288.     /* reset on a start */
  289.     if (!(start & 0x08))
  290.         maxrpm_p1_shift = 0;
  291.     if (!(start & 0x04))
  292.         maxrpm_p2_shift = 0;
  293.  
  294.     /* increment, decrement on falling edge */
  295.     if (!(shift & 0x01) && (maxrpm_last_shift & 0x01))
  296.     {
  297.         maxrpm_p1_shift++;
  298.         if (maxrpm_p1_shift > 4)
  299.             maxrpm_p1_shift = 4;
  300.     }
  301.     if (!(shift & 0x02) && (maxrpm_last_shift & 0x02))
  302.     {
  303.         maxrpm_p1_shift--;
  304.         if (maxrpm_p1_shift < 0)
  305.             maxrpm_p1_shift = 0;
  306.     }
  307.     if (!(shift & 0x04) && (maxrpm_last_shift & 0x04))
  308.     {
  309.         maxrpm_p2_shift++;
  310.         if (maxrpm_p2_shift > 4)
  311.             maxrpm_p2_shift = 4;
  312.     }
  313.     if (!(shift & 0x08) && (maxrpm_last_shift & 0x08))
  314.     {
  315.         maxrpm_p2_shift--;
  316.         if (maxrpm_p2_shift < 0)
  317.             maxrpm_p2_shift = 0;
  318.     }
  319.  
  320.     maxrpm_last_shift = shift;
  321.  
  322.     return ~((shift_bits[maxrpm_p1_shift] << 4) + shift_bits[maxrpm_p2_shift]);
  323. }
  324.  
  325.  
  326.  
  327. /*************************************
  328.  *
  329.  *    Spy Hunter input ports
  330.  *
  331.  *************************************/
  332.  
  333. static READ_HANDLER( spyhunt_port_2_r )
  334. {
  335.     /* multiplexed steering wheel/gas pedal */
  336.     return readinputport(6 + input_mux);
  337. }
  338.  
  339.  
  340. static WRITE_HANDLER( spyhunt_port_4_w )
  341. {
  342.     static UINT8 lastport4;
  343.  
  344.     /* Spy Hunter uses port 4 for talking to the Chip Squeak Deluxe */
  345.     /* (and for toggling the lamps and muxing the analog inputs) */
  346.  
  347.     /* mux select is in bit 7 */
  348.     input_mux = (data >> 7) & 1;
  349.  
  350.     /* lamp driver command triggered by bit 5, data is in low four bits */
  351.     if (((lastport4 ^ data) & 0x20) && !(data & 0x20))
  352.         spyhunt_lamp[data & 7] = (data >> 3) & 1;
  353.  
  354.     /* low 5 bits go to control the Chip Squeak Deluxe */
  355.     csdeluxe_data_w(offset, data);
  356.  
  357.     /* remember the last data */
  358.     lastport4 = data;
  359. }
  360.  
  361.  
  362.  
  363. /*************************************
  364.  *
  365.  *    Turbo Tag kludges
  366.  *
  367.  *************************************/
  368.  
  369. static READ_HANDLER( turbotag_kludge_r )
  370. {
  371.     /* The checksum on the ttprog1.bin ROM seems to be bad by 1 bit */
  372.     /* The checksum should come out to $82 but it should be $92     */
  373.     /* Unfortunately, the game refuses to start if any bad ROM is   */
  374.     /* found; to work around this, we catch the checksum byte read  */
  375.     /* and modify it to what we know we will be getting.            */
  376.     if (cpu_getpreviouspc() == 0xb29)
  377.         return 0x82;
  378.     else
  379.         return 0x92;
  380. }
  381.  
  382.  
  383.  
  384. /*************************************
  385.  *
  386.  *    NVRAM save/load
  387.  *
  388.  *************************************/
  389.  
  390. static void mcr3_nvram_handler(void *file, int read_or_write)
  391. {
  392.     unsigned char *ram = memory_region(REGION_CPU1);
  393.  
  394.     if (read_or_write)
  395.         osd_fwrite(file, &ram[0xe000], 0x800);
  396.     else if (file)
  397.         osd_fread(file, &ram[0xe000], 0x800);
  398. }
  399.  
  400.  
  401. static void spyhunt_nvram_handler(void *file, int read_or_write)
  402. {
  403.     unsigned char *ram = memory_region(REGION_CPU1);
  404.  
  405.     if (read_or_write)
  406.         osd_fwrite(file, &ram[0xf000], 0x800);
  407.     else if (file)
  408.         osd_fread(file, &ram[0xf000], 0x800);
  409. }
  410.  
  411.  
  412.  
  413. /*************************************
  414.  *
  415.  *    Main CPU memory handlers
  416.  *
  417.  *************************************/
  418.  
  419. static struct MemoryReadAddress readmem[] =
  420. {
  421.     { 0x0000, 0xdfff, MRA_ROM },
  422.     { 0xe000, 0xe9ff, MRA_RAM },
  423.     { 0xf000, 0xf7ff, MRA_RAM },
  424.     { -1 }  /* end of table */
  425. };
  426.  
  427.  
  428. static struct MemoryWriteAddress writemem[] =
  429. {
  430.     { 0x0000, 0xdfff, MWA_ROM },
  431.     { 0xe000, 0xe7ff, MWA_RAM },
  432.     { 0xe800, 0xe9ff, MWA_RAM, &spriteram, &spriteram_size },
  433.     { 0xf000, 0xf7ff, mcr3_videoram_w, &videoram, &videoram_size },
  434.     { 0xf800, 0xf8ff, mcr3_paletteram_w, &paletteram },
  435.     { -1 }  /* end of table */
  436. };
  437.  
  438.  
  439. static struct IOReadPort readport[] =
  440. {
  441.     { 0x00, 0x00, input_port_0_r },
  442.     { 0x01, 0x01, input_port_1_r },
  443.     { 0x02, 0x02, input_port_2_r },
  444.     { 0x03, 0x03, input_port_3_r },
  445.     { 0x04, 0x04, input_port_4_r },
  446.     { 0x07, 0x07, ssio_status_r },
  447.     { 0x10, 0x10, input_port_0_r },
  448.     { 0xf0, 0xf3, z80ctc_0_r },
  449.     { -1 }
  450. };
  451.  
  452.  
  453. static struct IOWritePort writeport[] =
  454. {
  455.     { 0x00, 0x00, mcr_control_port_w },
  456.     { 0x1c, 0x1f, ssio_data_w },
  457.     { 0x84, 0x86, mcr_scroll_value_w },
  458.     { 0xe0, 0xe0, watchdog_reset_w },
  459.     { 0xe8, 0xe8, MWA_NOP },
  460.     { 0xf0, 0xf3, z80ctc_0_w },
  461.     { -1 }
  462. };
  463.  
  464.  
  465.  
  466. /*************************************
  467.  *
  468.  *    MCR Monoboard CPU memory handlers
  469.  *
  470.  *************************************/
  471.  
  472. static struct MemoryWriteAddress mcrmono_writemem[] =
  473. {
  474.     { 0x0000, 0xdfff, MWA_ROM },
  475.     { 0xe000, 0xe7ff, MWA_RAM },
  476.     { 0xe800, 0xebff, MWA_RAM, &spriteram, &spriteram_size },
  477.     { 0xec00, 0xecff, mcr3_paletteram_w, &paletteram },
  478.     { 0xf000, 0xf7ff, mcr3_videoram_w, &videoram, &videoram_size },
  479.     { -1 }  /* end of table */
  480. };
  481.  
  482.  
  483.  
  484. /*************************************
  485.  *
  486.  *    Spy Hunter main CPU memory handlers
  487.  *
  488.  *************************************/
  489.  
  490. static struct MemoryReadAddress spyhunt_readmem[] =
  491. {
  492.     { 0x0000, 0xdfff, MRA_ROM },
  493.     { 0xe000, 0xebff, MRA_RAM },
  494.     { 0xf000, 0xffff, MRA_RAM },
  495.     { -1 }  /* end of table */
  496. };
  497.  
  498.  
  499. static struct MemoryWriteAddress spyhunt_writemem[] =
  500. {
  501.     { 0x0000, 0xdfff, MWA_ROM },
  502.     { 0xe000, 0xe7ff, videoram_w, &videoram, &videoram_size },
  503.     { 0xe800, 0xebff, MWA_RAM, &spyhunt_alpharam, &spyhunt_alpharam_size },
  504.     { 0xf000, 0xf7ff, MWA_RAM },
  505.     { 0xf800, 0xf9ff, MWA_RAM, &spriteram, &spriteram_size },
  506.     { 0xfa00, 0xfaff, mcr3_paletteram_w, &paletteram },
  507.     { -1 }  /* end of table */
  508. };
  509.  
  510.  
  511.  
  512. /*************************************
  513.  *
  514.  *    Port definitions
  515.  *
  516.  *************************************/
  517.  
  518. INPUT_PORTS_START( tapper )
  519.     PORT_START    /* IN0 */
  520.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  521.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  522.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
  523.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
  524.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
  525.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
  526.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  527.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  528.  
  529.     PORT_START    /* IN1 */
  530.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY )
  531.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_4WAY )
  532.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_4WAY )
  533.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_4WAY )
  534.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  535.     PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
  536.  
  537.     PORT_START    /* IN2 */
  538.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
  539.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_4WAY | IPF_COCKTAIL )
  540.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_4WAY | IPF_COCKTAIL )
  541.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_4WAY | IPF_COCKTAIL )
  542.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  543.     PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
  544.  
  545.     PORT_START    /* IN3 -- dipswitches */
  546.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) )
  547.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  548.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  549.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) )
  550.     PORT_DIPSETTING(    0x40, DEF_STR( Upright ) )
  551.     PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  552.     PORT_BIT( 0xbb, IP_ACTIVE_LOW, IPT_UNKNOWN )
  553.  
  554.     PORT_START    /* IN4 */
  555.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  556.  
  557.     PORT_START    /* AIN0 */
  558.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  559. INPUT_PORTS_END
  560.  
  561.  
  562. INPUT_PORTS_START( timber )
  563.     PORT_START    /* IN0 */
  564.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  565.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  566.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
  567.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
  568.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
  569.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
  570.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  571.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  572.  
  573.     PORT_START    /* IN1 */
  574.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_PLAYER1 )
  575.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_4WAY | IPF_PLAYER1 )
  576.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_4WAY | IPF_PLAYER1 )
  577.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_4WAY | IPF_PLAYER1 )
  578.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  579.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  580.     PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  581.  
  582.     PORT_START    /* IN2 */
  583.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_PLAYER2 )
  584.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_4WAY | IPF_PLAYER2 )
  585.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_4WAY | IPF_PLAYER2 )
  586.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_4WAY | IPF_PLAYER2 )
  587.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  588.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  589.     PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  590.  
  591.     PORT_START    /* IN3 -- dipswitches */
  592.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) )
  593.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  594.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  595.     PORT_BIT( 0xfb, IP_ACTIVE_LOW, IPT_UNKNOWN )
  596.  
  597.     PORT_START    /* IN4 */
  598.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  599.  
  600.     PORT_START    /* AIN0 */
  601.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  602. INPUT_PORTS_END
  603.  
  604.  
  605. INPUT_PORTS_START( dotron )
  606.     PORT_START    /* IN0 */
  607.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  608.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  609.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
  610.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
  611.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  612.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
  613.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 )
  614.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  615.  
  616.     PORT_START    /* IN1 */
  617.     PORT_ANALOGX( 0xff, 0x00, IPT_DIAL | IPF_REVERSE, 50, 10, 0, 0, KEYCODE_Z, KEYCODE_X, 0, 0 )
  618.  
  619.     PORT_START    /* IN2 */
  620.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  621.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  622.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  623.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  624.     PORT_BITX(0x10, IP_ACTIVE_LOW, IPT_BUTTON3, "Aim Down", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  625.     PORT_BITX(0x20, IP_ACTIVE_LOW, IPT_BUTTON4, "Aim Up", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  626.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
  627.     /* we default to Environmental otherwise speech is disabled */
  628.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
  629.     PORT_DIPSETTING(    0x80, DEF_STR( Upright ) )
  630.     PORT_DIPSETTING(    0x00, "Environmental" )
  631.  
  632.     PORT_START    /* IN3 -- dipswitches */
  633.     PORT_DIPNAME( 0x01, 0x01, "Coin Meters" )
  634.     PORT_DIPSETTING(    0x01, "1" )
  635.     PORT_DIPSETTING(    0x00, "2" )
  636.     PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN )
  637.  
  638.     PORT_START    /* IN4 */
  639.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  640.  
  641.     PORT_START    /* AIN0 */
  642.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  643.  
  644.     PORT_START    /* fake port to make aiming up & down easier */
  645.     PORT_ANALOG( 0xff, 0x00, IPT_TRACKBALL_Y, 100, 10, 0, 0 )
  646. INPUT_PORTS_END
  647.  
  648.  
  649. INPUT_PORTS_START( destderb )
  650.     PORT_START    /* IN0 */
  651.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  652.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  653.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
  654.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
  655.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
  656.     PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
  657.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT )
  658.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  659.  
  660.     PORT_START    /* IN1 -- the high 6 bits contain the steering wheel value */
  661.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  662.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  663.     PORT_ANALOG( 0xfc, 0x00, IPT_DIAL | IPF_REVERSE, 50, 10, 0, 0 )
  664.  
  665.     PORT_START    /* IN2 -- the high 6 bits contain the steering wheel value */
  666.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  667.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  668.     PORT_ANALOG( 0xfc, 0x00, IPT_DIAL | IPF_REVERSE | IPF_PLAYER2, 50, 10, 0, 0 )
  669.  
  670.     PORT_START    /* IN3 -- dipswitches */
  671.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
  672.     PORT_DIPSETTING(    0x01, "2P Upright" )
  673.     PORT_DIPSETTING(    0x00, "4P Cocktail" )
  674.     PORT_DIPNAME( 0x02, 0x02, DEF_STR( Difficulty ) )
  675.     PORT_DIPSETTING(    0x02, "Normal" )
  676.     PORT_DIPSETTING(    0x00, "Harder" )
  677.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) )
  678.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  679.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  680.     PORT_DIPNAME( 0x08, 0x08, "Reward Screen" )
  681.     PORT_DIPSETTING(    0x08, "Expanded" )
  682.     PORT_DIPSETTING(    0x00, "Limited" )
  683.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) )
  684.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  685.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_2C ) )
  686.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
  687.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
  688.     PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
  689.  
  690.     PORT_START    /* IN4 */
  691.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
  692.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 )
  693.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START3 )
  694.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START4 )
  695.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  696.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  697.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  698.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  699.  
  700.     PORT_START    /* AIN0 */
  701.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  702. INPUT_PORTS_END
  703.  
  704.  
  705. INPUT_PORTS_START( sarge )
  706.     PORT_START    /* IN0 */
  707.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  708.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  709.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
  710.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
  711.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT )
  712.     PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
  713.     PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  714.  
  715.     PORT_START    /* IN1 */
  716.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP    | IPF_2WAY | IPF_PLAYER1 )
  717.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN  | IPF_2WAY | IPF_PLAYER1 )
  718.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP   | IPF_2WAY | IPF_PLAYER1 )
  719.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN | IPF_2WAY | IPF_PLAYER1 )
  720.     PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  721.     PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  722.  
  723.     PORT_START    /* IN2 */
  724.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP    | IPF_2WAY | IPF_PLAYER2 )
  725.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN  | IPF_2WAY | IPF_PLAYER2 )
  726.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP   | IPF_2WAY | IPF_PLAYER2 )
  727.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN | IPF_2WAY | IPF_PLAYER2 )
  728.     PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  729.     PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  730.  
  731.     PORT_START    /* IN3 -- dipswitches */
  732.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Free_Play ) )
  733.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  734.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  735.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) )
  736.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  737.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
  738.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
  739. /* 0x00 says 2 Coins/2 Credits in service mode, but gives 1 Coin/1 Credit */
  740.     PORT_BIT( 0xc7, IP_ACTIVE_LOW, IPT_UNKNOWN )
  741.  
  742.     PORT_START    /* IN4 */
  743.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  744.  
  745.     PORT_START    /* AIN0 */
  746.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  747.  
  748.     PORT_START    /* fake port for single joystick control */
  749.     /* This fake port is handled via sarge_port_1_r and sarge_port_2_r */
  750.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_CHEAT | IPF_PLAYER1 )
  751.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_CHEAT | IPF_PLAYER1 )
  752.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_CHEAT | IPF_PLAYER1 )
  753.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_CHEAT | IPF_PLAYER1 )
  754.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_CHEAT | IPF_PLAYER2 )
  755.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_CHEAT | IPF_PLAYER2 )
  756.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_CHEAT | IPF_PLAYER2 )
  757.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_CHEAT | IPF_PLAYER2 )
  758. INPUT_PORTS_END
  759.  
  760.  
  761. INPUT_PORTS_START( rampage )
  762.     PORT_START    /* IN0 */
  763.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  764.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  765.     PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
  766.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT )
  767.     PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
  768.     PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  769.  
  770.     PORT_START    /* IN1 */
  771.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  772.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  773.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  774.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  775.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  776.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  777.     PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  778.  
  779.     PORT_START    /* IN2 */
  780.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  781.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  782.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  783.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  784.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  785.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  786.     PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  787.  
  788.     PORT_START    /* IN3 -- dipswitches */
  789.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
  790.     PORT_DIPSETTING(    0x02, "Easy" )
  791.     PORT_DIPSETTING(    0x03, "Normal" )
  792.     PORT_DIPSETTING(    0x01, "Hard" )
  793.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  794.     PORT_DIPNAME( 0x04, 0x04, "Score Option" )
  795.     PORT_DIPSETTING(    0x04, "Keep score when continuing" )
  796.     PORT_DIPSETTING(    0x00, "Lose score when continuing" )
  797.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coin_A ) )
  798.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
  799.     PORT_DIPSETTING(    0x08, DEF_STR( 1C_1C ) )
  800.     PORT_DIPNAME( 0x70, 0x70, DEF_STR( Coin_B ) )
  801.     PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) )
  802.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  803.     PORT_DIPSETTING(    0x70, DEF_STR( 1C_1C ) )
  804.     PORT_DIPSETTING(    0x60, DEF_STR( 1C_2C ) )
  805.     PORT_DIPSETTING(    0x50, DEF_STR( 1C_3C ) )
  806.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_4C ) )
  807.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_5C ) )
  808.     PORT_DIPSETTING(    0x20, DEF_STR( 1C_6C ) )
  809.     PORT_BITX( 0x80,    0x80, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Rack Advance", KEYCODE_F1, IP_JOY_NONE )
  810.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  811.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  812.  
  813.     PORT_START    /* IN4 */
  814.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_4WAY | IPF_PLAYER3 )
  815.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_PLAYER3 )
  816.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_4WAY | IPF_PLAYER3 )
  817.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_4WAY | IPF_PLAYER3 )
  818.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  819.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  820.     PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  821.  
  822.     PORT_START    /* AIN0 */
  823.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  824. INPUT_PORTS_END
  825.  
  826.  
  827. INPUT_PORTS_START( powerdrv )
  828.     PORT_START    /* IN0 */
  829.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  830.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  831.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  832.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
  833.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT )
  834.     PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
  835.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN4 )
  836.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  837.  
  838.     PORT_START    /* IN1 */
  839.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
  840.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER1 | IPF_TOGGLE )
  841.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  842.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  843.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  844.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER2 | IPF_TOGGLE )
  845.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  846.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  847.  
  848.     PORT_START    /* IN2 */
  849.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
  850.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER3 | IPF_TOGGLE )
  851.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  852.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  853.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  854.  
  855.     PORT_START    /* IN3 -- dipswitches */
  856.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
  857.     PORT_DIPSETTING(    0x02, DEF_STR( 2C_1C ) )
  858. /*    PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )*/
  859.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
  860.     PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
  861.     PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
  862.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
  863.     PORT_DIPSETTING(    0x20, "Easy" )
  864.     PORT_DIPSETTING(    0x30, "Factory" )
  865.     PORT_DIPSETTING(    0x10, "Hard" )
  866.     PORT_DIPSETTING(    0x00, "Hardest" )
  867.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) )
  868.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  869.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  870.     PORT_BITX( 0x80,    0x80, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Rack Advance", KEYCODE_F1, IP_JOY_NONE )
  871.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  872.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  873.  
  874.     PORT_START    /* IN4 */
  875.     PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  876.  
  877.     PORT_START    /* AIN0 */
  878.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  879. INPUT_PORTS_END
  880.  
  881.  
  882. INPUT_PORTS_START( maxrpm )
  883.     PORT_START    /* IN0 */
  884.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  885.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  886.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
  887.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
  888.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT )
  889.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  890.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  891.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  892.  
  893.     PORT_START    /* IN1 */
  894.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  895.  
  896.     PORT_START    /* IN2 */
  897.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  898.  
  899.     PORT_START    /* IN3 -- dipswitches */
  900.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Free_Play ) )
  901.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  902.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  903.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) )
  904.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  905.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
  906.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
  907. /* 0x00 says 2 Coins/2 Credits in service mode, but gives 1 Coin/1 Credit */
  908.     PORT_BIT( 0xc7, IP_ACTIVE_LOW, IPT_UNKNOWN )
  909.  
  910.     PORT_START    /* IN4 */
  911.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  912.  
  913.     PORT_START    /* AIN0 */
  914.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  915.  
  916.     PORT_START    /* new fake for acceleration */
  917.     PORT_ANALOG( 0xff, 0x30, IPT_PEDAL | IPF_REVERSE | IPF_PLAYER2, 100, 10, 0x30, 0xff )
  918.  
  919.     PORT_START    /* new fake for acceleration */
  920.     PORT_ANALOG( 0xff, 0x30, IPT_PEDAL | IPF_REVERSE | IPF_PLAYER1, 100, 10, 0x30, 0xff )
  921.  
  922.     PORT_START    /* new fake for steering */
  923.     PORT_ANALOG( 0xff, 0x74, IPT_PADDLE | IPF_PLAYER2 | IPF_REVERSE, 40, 10, 0x34, 0xb4 )
  924.  
  925.     PORT_START    /* new fake for steering */
  926.     PORT_ANALOG( 0xff, 0x74, IPT_PADDLE | IPF_PLAYER1 | IPF_REVERSE, 40, 10, 0x34, 0xb4 )
  927.  
  928.     PORT_START    /* fake for shifting */
  929.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  930.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  931.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  932.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  933.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
  934. INPUT_PORTS_END
  935.  
  936.  
  937. INPUT_PORTS_START( spyhunt )
  938.     PORT_START    /* IN0 */
  939.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  940.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  941.     PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
  942.     PORT_BITX(0x10, IP_ACTIVE_LOW, IPT_BUTTON6 | IPF_TOGGLE, "Gear Shift", KEYCODE_ENTER, IP_JOY_DEFAULT )
  943.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
  944.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE )
  945.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  946.  
  947.     PORT_START    /* IN1 -- various buttons, low 5 bits */
  948.     PORT_BITX( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4, "Oil Slick", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  949.     PORT_BITX( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5, "Missiles", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  950.     PORT_BITX( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3, "Weapon Truck", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  951.     PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_START1 )
  952.     PORT_BITX( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2, "Smoke Screen", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  953.     PORT_BITX( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1, "Machine Guns", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  954.     PORT_BIT(  0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
  955.  
  956.     PORT_START    /* IN2 -- actually not used at all, but read as a trakport */
  957.     PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
  958.  
  959.     PORT_START    /* IN3 -- dipswitches -- low 4 bits only */
  960.     PORT_DIPNAME( 0x01, 0x01, "Game Timer" )
  961.     PORT_DIPSETTING(    0x00, "1:00" )
  962.     PORT_DIPSETTING(    0x01, "1:30" )
  963.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  964.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  965.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  966.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  967.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  968.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  969.  
  970.     PORT_START    /* IN4 */
  971.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  972.  
  973.     PORT_START    /* AIN0 */
  974.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  975.  
  976.     PORT_START    /* new fake for acceleration */
  977.     PORT_ANALOG( 0xff, 0x30, IPT_PEDAL, 100, 10, 0x30, 0xff )
  978.  
  979.     PORT_START    /* new fake for steering */
  980.     PORT_ANALOG( 0xff, 0x74, IPT_PADDLE, 40, 10, 0x34, 0xb4 )
  981. INPUT_PORTS_END
  982.  
  983.  
  984. INPUT_PORTS_START( turbotag )
  985.     PORT_START    /* IN0 */
  986.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  987.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  988.     PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
  989.     PORT_BITX(0x10, IP_ACTIVE_LOW, IPT_BUTTON6 | IPF_TOGGLE, "Gear Shift", KEYCODE_ENTER, IP_JOY_DEFAULT )
  990.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
  991.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE )
  992.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  993.  
  994.     PORT_START    /* IN1 -- various buttons, low 5 bits */
  995.     PORT_BITX( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4, "Left Button", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  996.     PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  997.     PORT_BITX( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5, "Left Trigger", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  998.     PORT_BITX( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3, "Center Button", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  999.     PORT_BITX( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2, "Right Button", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  1000.     PORT_BITX( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1, "Right Trigger", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  1001.     PORT_BIT(  0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
  1002.  
  1003.     PORT_START    /* IN2 -- actually not used at all, but read as a trakport */
  1004.     PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
  1005.  
  1006.     PORT_START    /* IN3 -- dipswitches -- low 4 bits only */
  1007.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1008.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  1009.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1010.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1011.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1012.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1013.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  1014.  
  1015.     PORT_START    /* IN4 */
  1016.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1017.  
  1018.     PORT_START    /* AIN0 */
  1019.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1020.  
  1021.     PORT_START    /* new fake for acceleration */
  1022.     PORT_ANALOG( 0xff, 0x30, IPT_PEDAL, 100, 10, 0x30, 0xc0 )
  1023.  
  1024.     PORT_START    /* new fake for steering */
  1025.     PORT_ANALOG( 0xff, 0x74, IPT_PADDLE, 40, 10, 0x34, 0xb4 )
  1026. INPUT_PORTS_END
  1027.  
  1028.  
  1029. INPUT_PORTS_START( crater )
  1030.     PORT_START    /* IN0 */
  1031.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  1032.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  1033.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
  1034.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
  1035.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  1036.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
  1037.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  1038.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  1039.  
  1040.     PORT_START    /* IN1 */
  1041.     PORT_ANALOGX( 0xff, 0x00, IPT_DIAL | IPF_REVERSE, 25, 10, 0, 0, KEYCODE_Z, KEYCODE_X, 0, 0 )
  1042.  
  1043.     PORT_START    /* IN2 */
  1044.     PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED )
  1045.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP   | IPF_2WAY )
  1046.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_2WAY )
  1047.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 )
  1048.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
  1049.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
  1050.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  1051.  
  1052.     PORT_START    /* IN3 -- dipswitches */
  1053.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1054.  
  1055.     PORT_START    /* IN4 */
  1056.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1057.  
  1058.     PORT_START    /* AIN0 */
  1059.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1060. INPUT_PORTS_END
  1061.  
  1062.  
  1063.  
  1064. /*************************************
  1065.  *
  1066.  *    Graphics definitions
  1067.  *
  1068.  *************************************/
  1069.  
  1070. static struct GfxLayout spyhunt_charlayout =
  1071. {
  1072.     64,32,
  1073.     RGN_FRAC(1,2),
  1074.     4,
  1075.     { RGN_FRAC(1,2), RGN_FRAC(1,2)+1, 0, 1 },
  1076.     {  0,  0,  2,  2,  4,  4,  6,  6,  8,  8, 10, 10, 12, 12, 14, 14,
  1077.       16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30,
  1078.       32, 32, 34, 34, 36, 36, 38, 38, 40, 40, 42, 42, 44, 44, 46, 46,
  1079.       48, 48, 50, 50, 52, 52, 54, 54, 56, 56, 58, 58, 60, 60, 62, 62 },
  1080.     { 0*32,  0*32,  2*32,  2*32,  4*32,  4*32,  6*32,  6*32,
  1081.       8*32,  8*32, 10*32, 10*32, 12*32, 12*32, 14*32, 14*32,
  1082.      16*32, 16*32, 18*32, 18*32, 20*32, 20*32, 22*32, 22*32,
  1083.      24*32, 24*32, 26*32, 26*32, 28*32, 28*32, 30*32, 30*32 },
  1084.     128*8
  1085. };
  1086.  
  1087.  
  1088. static struct GfxLayout spyhunt_alphalayout =
  1089. {
  1090.     16,16,
  1091.     RGN_FRAC(1,1),
  1092.     2,
  1093.     { 0, 1 },
  1094.     { 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14 },
  1095.     { 0, 0, 2*8, 2*8, 4*8, 4*8, 6*8, 6*8, 8*8, 8*8, 10*8, 10*8, 12*8, 12*8, 14*8, 14*8 },
  1096.     16*8
  1097. };
  1098.  
  1099.  
  1100. static struct GfxDecodeInfo gfxdecodeinfo[] =
  1101. {
  1102.     { REGION_GFX1, 0, &mcr_bg_layout,     0, 4 },
  1103.     { REGION_GFX2, 0, &mcr_sprite_layout, 0, 4 },
  1104.     { -1 } /* end of array */
  1105. };
  1106.  
  1107.  
  1108. static struct GfxDecodeInfo spyhunt_gfxdecodeinfo[] =
  1109. {
  1110.     { REGION_GFX1, 0, &spyhunt_charlayout,  1*16, 1 },
  1111.     { REGION_GFX2, 0, &mcr_sprite_layout,   0*16, 4 },
  1112.     { REGION_GFX3, 0, &spyhunt_alphalayout, 8*16, 1 },
  1113.     { -1 } /* end of array */
  1114. };
  1115.  
  1116.  
  1117.  
  1118. /*************************************
  1119.  *
  1120.  *    Machine drivers
  1121.  *
  1122.  *************************************/
  1123.  
  1124. /* common pieces */
  1125. #define MAIN_CPU(interrupt)                             \
  1126.     {                                                    \
  1127.         CPU_Z80,                                        \
  1128.         5000000,    /* 5 Mhz */                            \
  1129.         readmem,writemem,readport,writeport,            \
  1130.         interrupt,1,                                    \
  1131.         0,0,mcr_daisy_chain                                \
  1132.     }
  1133.  
  1134. #define MONO_CPU(interrupt)                             \
  1135.     {                                                    \
  1136.         CPU_Z80,                                        \
  1137.         5000000,    /* 5 Mhz */                            \
  1138.         readmem,mcrmono_writemem,readport,writeport,    \
  1139.         interrupt,1,                                    \
  1140.         0,0,mcr_daisy_chain                                \
  1141.     }
  1142.  
  1143. #define SPYHUNT_CPU(interrupt)                             \
  1144.     {                                                    \
  1145.         CPU_Z80,                                        \
  1146.         5000000,    /* 5 Mhz */                            \
  1147.         spyhunt_readmem,spyhunt_writemem,readport,writeport,\
  1148.         interrupt,1,                                    \
  1149.         0,0,mcr_daisy_chain                                \
  1150.     }
  1151.  
  1152.  
  1153. /* General MCR3 system */
  1154. static struct MachineDriver machine_driver_mcr3 =
  1155. {
  1156.     /* basic machine hardware */
  1157.     {
  1158.         MAIN_CPU(mcr_interrupt),
  1159.         SOUND_CPU_SSIO
  1160.     },
  1161.     30, DEFAULT_REAL_30HZ_VBLANK_DURATION,
  1162.     1,
  1163.     mcr_init_machine,
  1164.  
  1165.     /* video hardware */
  1166.     32*16, 30*16, { 0*16, 32*16-1, 0*16, 30*16-1 },
  1167.     gfxdecodeinfo,
  1168.     8*16, 8*16,
  1169.     0,
  1170.  
  1171.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_SUPPORTS_DIRTY | VIDEO_UPDATE_BEFORE_VBLANK,
  1172.     0,
  1173.     generic_vh_start,
  1174.     generic_vh_stop,
  1175.     mcr3_vh_screenrefresh,
  1176.  
  1177.     /* sound hardware */
  1178.     SOUND_SUPPORTS_STEREO,0,0,0,
  1179.     {
  1180.         SOUND_SSIO
  1181.     },
  1182.     mcr3_nvram_handler
  1183. };
  1184.  
  1185.  
  1186. /* Discs of Tron = General MCR3 with Squawk & Talk, and backdrop support */
  1187. static struct MachineDriver machine_driver_dotron =
  1188. {
  1189.     /* basic machine hardware */
  1190.     {
  1191.         MAIN_CPU(dotron_interrupt),
  1192.         SOUND_CPU_SSIO,
  1193.         SOUND_CPU_SQUAWK_N_TALK
  1194.     },
  1195.     30, DEFAULT_REAL_30HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1196.     1,
  1197.     mcr_init_machine,
  1198.  
  1199.     /* video hardware */
  1200.     800, 600, { 0, 800-1, 0, 600-1 },
  1201.     gfxdecodeinfo,
  1202.     4*16+32768, 4*16,        /* The extra colors are for the backdrop */
  1203.     0,
  1204.  
  1205.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_SUPPORTS_DIRTY | VIDEO_UPDATE_BEFORE_VBLANK,
  1206.     0,
  1207.     dotron_vh_start,
  1208.     generic_vh_stop,
  1209.     dotron_vh_screenrefresh,
  1210.  
  1211.     /* sound hardware */
  1212.     SOUND_SUPPORTS_STEREO,0,0,0,
  1213.     {
  1214.         SOUND_SSIO,
  1215.         SOUND_SQUAWK_N_TALK,
  1216.     },
  1217.     mcr3_nvram_handler
  1218. };
  1219.  
  1220.  
  1221. /* Destruction Derby = General MCR3 with Turbo Chip Squeak instead of SSIO */
  1222. static struct MachineDriver machine_driver_destderb =
  1223. {
  1224.     /* basic machine hardware */
  1225.     {
  1226.         MAIN_CPU(mcr_interrupt),
  1227.         SOUND_CPU_TURBO_CHIP_SQUEAK
  1228.     },
  1229.     30, DEFAULT_REAL_30HZ_VBLANK_DURATION,
  1230.     1,
  1231.     mcr_init_machine,
  1232.  
  1233.     /* video hardware */
  1234.     32*16, 30*16, { 0*16, 32*16-1, 0*16, 30*16-1 },
  1235.     gfxdecodeinfo,
  1236.     8*16, 8*16,
  1237.     0,
  1238.  
  1239.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_SUPPORTS_DIRTY | VIDEO_UPDATE_BEFORE_VBLANK,
  1240.     0,
  1241.     generic_vh_start,
  1242.     generic_vh_stop,
  1243.     mcr3_vh_screenrefresh,
  1244.  
  1245.     /* sound hardware */
  1246.     SOUND_SUPPORTS_STEREO,0,0,0,
  1247.     {
  1248.         SOUND_TURBO_CHIP_SQUEAK
  1249.     },
  1250.     mcr3_nvram_handler
  1251. };
  1252.  
  1253.  
  1254. /* Sarge/Demolition Derby Mono/Max RPM = MCR monoboardmonoboard = MCR3 with no SSIO */
  1255. /* in this case, Turbo Chip Squeak is used for sound */
  1256. static struct MachineDriver machine_driver_sarge =
  1257. {
  1258.     /* basic machine hardware */
  1259.     {
  1260.         MONO_CPU(mcr_interrupt),
  1261.         SOUND_CPU_TURBO_CHIP_SQUEAK
  1262.     },
  1263.     30, DEFAULT_REAL_30HZ_VBLANK_DURATION,
  1264.     1,
  1265.     mcr_init_machine,
  1266.  
  1267.     /* video hardware */
  1268.     32*16, 30*16, { 0*16, 32*16-1, 0*16, 30*16-1 },
  1269.     gfxdecodeinfo,
  1270.     8*16, 8*16,
  1271.     0,
  1272.  
  1273.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_SUPPORTS_DIRTY | VIDEO_UPDATE_BEFORE_VBLANK,
  1274.     0,
  1275.     generic_vh_start,
  1276.     generic_vh_stop,
  1277.     mcrmono_vh_screenrefresh,
  1278.  
  1279.     /* sound hardware */
  1280.     SOUND_SUPPORTS_STEREO,0,0,0,
  1281.     {
  1282.         SOUND_TURBO_CHIP_SQUEAK
  1283.     },
  1284.     0
  1285. };
  1286.  
  1287.  
  1288. /* Rampage = MCR monoboard with Sounds Good */
  1289. static struct MachineDriver machine_driver_rampage =
  1290. {
  1291.     /* basic machine hardware */
  1292.     {
  1293.         MONO_CPU(mcr_interrupt),
  1294.         SOUND_CPU_SOUNDS_GOOD
  1295.     },
  1296.     30, DEFAULT_REAL_30HZ_VBLANK_DURATION,
  1297.     1,
  1298.     mcr_init_machine,
  1299.  
  1300.     /* video hardware */
  1301.     32*16, 30*16, { 0*16, 32*16-1, 0*16, 30*16-1 },
  1302.     gfxdecodeinfo,
  1303.     8*16, 8*16,
  1304.     0,
  1305.  
  1306.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_SUPPORTS_DIRTY | VIDEO_UPDATE_BEFORE_VBLANK,
  1307.     0,
  1308.     generic_vh_start,
  1309.     generic_vh_stop,
  1310.     mcrmono_vh_screenrefresh,
  1311.  
  1312.     /* sound hardware */
  1313.     SOUND_SUPPORTS_STEREO,0,0,0,
  1314.     {
  1315.         SOUND_SOUNDS_GOOD
  1316.     },
  1317.     0
  1318. };
  1319.  
  1320.  
  1321. /* Power Drive = MCR monoboard with Sounds Good and external interrupts */
  1322. static struct MachineDriver machine_driver_powerdrv =
  1323. {
  1324.     /* basic machine hardware */
  1325.     {
  1326.         {
  1327.             CPU_Z80,
  1328.             5000000,    /* 5 Mhz */
  1329.             readmem,mcrmono_writemem,readport,writeport,
  1330.             powerdrv_interrupt,2,
  1331.             0,0,mcr_daisy_chain
  1332.         },
  1333.         SOUND_CPU_SOUNDS_GOOD
  1334.     },
  1335.     30, DEFAULT_REAL_30HZ_VBLANK_DURATION,
  1336.     1,
  1337.     mcr_init_machine,
  1338.  
  1339.     /* video hardware */
  1340.     32*16, 30*16, { 0*16, 32*16-1, 0*16, 30*16-1 },
  1341.     gfxdecodeinfo,
  1342.     8*16, 8*16,
  1343.     0,
  1344.  
  1345.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_SUPPORTS_DIRTY | VIDEO_UPDATE_BEFORE_VBLANK,
  1346.     0,
  1347.     generic_vh_start,
  1348.     generic_vh_stop,
  1349.     mcrmono_vh_screenrefresh,
  1350.  
  1351.     /* sound hardware */
  1352.     SOUND_SUPPORTS_STEREO,0,0,0,
  1353.     {
  1354.         SOUND_SOUNDS_GOOD
  1355.     },
  1356.     0
  1357. };
  1358.  
  1359.  
  1360. /* Spy Hunter = MCR3 with altered memory map, scrolling, special lamps, and a chip squeak deluxe */
  1361. static struct MachineDriver machine_driver_spyhunt =
  1362. {
  1363.     /* basic machine hardware */
  1364.     {
  1365.         SPYHUNT_CPU(mcr_interrupt),
  1366.         SOUND_CPU_SSIO,
  1367.         SOUND_CPU_CHIP_SQUEAK_DELUXE
  1368.     },
  1369.     30, DEFAULT_REAL_30HZ_VBLANK_DURATION,
  1370.     1,
  1371.     mcr_init_machine,
  1372.  
  1373.     /* video hardware */
  1374.     31*16, 30*16, { 0, 31*16-1, 0, 30*16-1 },
  1375.     spyhunt_gfxdecodeinfo,
  1376.     8*16+4, 8*16+4,
  1377.     spyhunt_vh_convert_color_prom,
  1378.  
  1379.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  1380.     0,
  1381.     spyhunt_vh_start,
  1382.     spyhunt_vh_stop,
  1383.     spyhunt_vh_screenrefresh,
  1384.  
  1385.     /* sound hardware */
  1386.     SOUND_SUPPORTS_STEREO,0,0,0,
  1387.     {
  1388.         SOUND_SSIO,
  1389.         SOUND_CHIP_SQUEAK_DELUXE
  1390.     },
  1391.     spyhunt_nvram_handler
  1392. };
  1393.  
  1394.  
  1395. /* Turbo Tag = Spy Hunter with no SSIO */
  1396. static struct MachineDriver machine_driver_turbotag =
  1397. {
  1398.     /* basic machine hardware */
  1399.     {
  1400.         SPYHUNT_CPU(mcr_interrupt),
  1401.         SOUND_CPU_CHIP_SQUEAK_DELUXE
  1402.     },
  1403.     30, DEFAULT_REAL_30HZ_VBLANK_DURATION,
  1404.     1,
  1405.     mcr_init_machine,
  1406.  
  1407.     /* video hardware */
  1408.     30*16, 30*16, { 0, 30*16-1, 0, 30*16-1 },
  1409.     spyhunt_gfxdecodeinfo,
  1410.     8*16+4, 8*16+4,
  1411.     spyhunt_vh_convert_color_prom,
  1412.  
  1413.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  1414.     0,
  1415.     spyhunt_vh_start,
  1416.     spyhunt_vh_stop,
  1417.     spyhunt_vh_screenrefresh,
  1418.  
  1419.     /* sound hardware */
  1420.     SOUND_SUPPORTS_STEREO,0,0,0,
  1421.     {
  1422.         SOUND_CHIP_SQUEAK_DELUXE
  1423.     },
  1424.     spyhunt_nvram_handler
  1425. };
  1426.  
  1427.  
  1428. /* Crater Raider = Spy Hunter with no Chip Squeak Deluxe */
  1429. static struct MachineDriver machine_driver_crater =
  1430. {
  1431.     /* basic machine hardware */
  1432.     {
  1433.         SPYHUNT_CPU(mcr_interrupt),
  1434.         SOUND_CPU_SSIO
  1435.     },
  1436.     30, DEFAULT_REAL_30HZ_VBLANK_DURATION,
  1437.     1,
  1438.     mcr_init_machine,
  1439.  
  1440.     /* video hardware */
  1441.     30*16, 30*16, { 0, 30*16-1, 0, 30*16-1 },
  1442.     spyhunt_gfxdecodeinfo,
  1443.     8*16+4, 8*16+4,
  1444.     spyhunt_vh_convert_color_prom,
  1445.  
  1446.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  1447.     0,
  1448.     spyhunt_vh_start,
  1449.     spyhunt_vh_stop,
  1450.     spyhunt_vh_screenrefresh,
  1451.  
  1452.     /* sound hardware */
  1453.     SOUND_SUPPORTS_STEREO,0,0,0,
  1454.     {
  1455.         SOUND_SSIO
  1456.     },
  1457.     spyhunt_nvram_handler
  1458. };
  1459.  
  1460.  
  1461.  
  1462. /*************************************
  1463.  *
  1464.  *    ROM definitions
  1465.  *
  1466.  *************************************/
  1467.  
  1468. ROM_START( tapper )
  1469.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1470.     ROM_LOAD( "tappg0.bin",   0x00000, 0x4000, 0x127171d1 )
  1471.     ROM_LOAD( "tappg1.bin",   0x04000, 0x4000, 0x9d6a47f7 )
  1472.     ROM_LOAD( "tappg2.bin",   0x08000, 0x4000, 0x3a1f8778 )
  1473.     ROM_LOAD( "tappg3.bin",   0x0c000, 0x2000, 0xe8dcdaa4 )
  1474.  
  1475.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  1476.     ROM_LOAD( "tapsnda7.bin", 0x0000, 0x1000, 0x0e8bb9d5 )
  1477.     ROM_LOAD( "tapsnda8.bin", 0x1000, 0x1000, 0x0cf0e29b )
  1478.     ROM_LOAD( "tapsnda9.bin", 0x2000, 0x1000, 0x31eb6dc6 )
  1479.     ROM_LOAD( "tapsda10.bin", 0x3000, 0x1000, 0x01a9be6a )
  1480.  
  1481.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1482.     ROM_LOAD( "tapbg1.bin",   0x00000, 0x4000, 0x2a30238c )
  1483.     ROM_LOAD( "tapbg0.bin",   0x04000, 0x4000, 0x394ab576 )
  1484.  
  1485.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1486.     ROM_LOAD( "tapfg1.bin",   0x00000, 0x4000, 0x32509011 )
  1487.     ROM_LOAD( "tapfg0.bin",   0x04000, 0x4000, 0x8412c808 )
  1488.     ROM_LOAD( "tapfg3.bin",   0x08000, 0x4000, 0x818fffd4 )
  1489.     ROM_LOAD( "tapfg2.bin",   0x0c000, 0x4000, 0x67e37690 )
  1490.     ROM_LOAD( "tapfg5.bin",   0x10000, 0x4000, 0x800f7c8a )
  1491.     ROM_LOAD( "tapfg4.bin",   0x14000, 0x4000, 0x32674ee6 )
  1492.     ROM_LOAD( "tapfg7.bin",   0x18000, 0x4000, 0x070b4c81 )
  1493.     ROM_LOAD( "tapfg6.bin",   0x1c000, 0x4000, 0xa37aef36 )
  1494. ROM_END
  1495.  
  1496.  
  1497. ROM_START( tappera )
  1498.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1499.     ROM_LOAD( "pr00_1c.128",   0x00000, 0x4000, 0xbb060bb0 )
  1500.     ROM_LOAD( "pr01_2c.128",   0x04000, 0x4000, 0xfd9acc22 )
  1501.     ROM_LOAD( "pr02_3c.128",   0x08000, 0x4000, 0xb3755d41 )
  1502.     ROM_LOAD( "pr03_4c.64",    0x0c000, 0x2000, 0x77273096 )
  1503.  
  1504.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  1505.     ROM_LOAD( "tapsnda7.bin", 0x0000, 0x1000, 0x0e8bb9d5 )
  1506.     ROM_LOAD( "tapsnda8.bin", 0x1000, 0x1000, 0x0cf0e29b )
  1507.     ROM_LOAD( "tapsnda9.bin", 0x2000, 0x1000, 0x31eb6dc6 )
  1508.     ROM_LOAD( "tapsda10.bin", 0x3000, 0x1000, 0x01a9be6a )
  1509.  
  1510.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1511.     ROM_LOAD( "tapbg1.bin",   0x00000, 0x4000, 0x2a30238c )
  1512.     ROM_LOAD( "tapbg0.bin",   0x04000, 0x4000, 0x394ab576 )
  1513.  
  1514.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1515.     ROM_LOAD( "fg1_a7.128",   0x00000, 0x4000, 0xbac70b69 )
  1516.     ROM_LOAD( "fg0_a8.128",   0x04000, 0x4000, 0xc300925d )
  1517.     ROM_LOAD( "fg3_a5.128",   0x08000, 0x4000, 0xecff6c23 )
  1518.     ROM_LOAD( "fg2_a6.128",   0x0c000, 0x4000, 0xa4f2d1be )
  1519.     ROM_LOAD( "fg5_a3.128",   0x10000, 0x4000, 0x16ce38cb )
  1520.     ROM_LOAD( "fg4_a4.128",   0x14000, 0x4000, 0x082a4059 )
  1521.     ROM_LOAD( "fg7_a1.128",   0x18000, 0x4000, 0x3b476abe )
  1522.     ROM_LOAD( "fg6_a2.128",   0x1c000, 0x4000, 0x6717264c )
  1523. ROM_END
  1524.  
  1525.  
  1526. ROM_START( sutapper )
  1527.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1528.     ROM_LOAD( "5791",         0x0000, 0x4000, 0x87119cc4 )
  1529.     ROM_LOAD( "5792",         0x4000, 0x4000, 0x4c23ad89 )
  1530.     ROM_LOAD( "5793",         0x8000, 0x4000, 0xfecbf683 )
  1531.     ROM_LOAD( "5794",         0xc000, 0x2000, 0x5bdc1916 )
  1532.  
  1533.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  1534.     ROM_LOAD( "5788",         0x00000, 0x1000, 0x5c1d0982 )
  1535.     ROM_LOAD( "5787",         0x01000, 0x1000, 0x09e74ed8 )
  1536.     ROM_LOAD( "5786",         0x02000, 0x1000, 0xc3e98284 )
  1537.     ROM_LOAD( "5785",         0x03000, 0x1000, 0xced2fd47 )
  1538.  
  1539.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1540.     ROM_LOAD( "5790",         0x00000, 0x4000, 0xac1558c1 )
  1541.     ROM_LOAD( "5789",         0x04000, 0x4000, 0xfa66cab5 )
  1542.  
  1543.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1544.     ROM_LOAD( "5795",         0x00000, 0x4000, 0x5d987c92 )
  1545.     ROM_LOAD( "5796",         0x04000, 0x4000, 0xde5700b4 )
  1546.     ROM_LOAD( "5797",         0x08000, 0x4000, 0xf10a1d05 )
  1547.     ROM_LOAD( "5798",         0x0c000, 0x4000, 0x614990cd )
  1548.     ROM_LOAD( "5799",         0x10000, 0x4000, 0x02c69432 )
  1549.     ROM_LOAD( "5800",         0x14000, 0x4000, 0xebf1f948 )
  1550.     ROM_LOAD( "5801",         0x18000, 0x4000, 0xd70defa7 )
  1551.     ROM_LOAD( "5802",         0x1c000, 0x4000, 0xd4f114b9 )
  1552. ROM_END
  1553.  
  1554.  
  1555. ROM_START( rbtapper )
  1556.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1557.     ROM_LOAD( "rbtpg0.bin",   0x00000, 0x4000, 0x20b9adf4 )
  1558.     ROM_LOAD( "rbtpg1.bin",   0x04000, 0x4000, 0x87e616c2 )
  1559.     ROM_LOAD( "rbtpg2.bin",   0x08000, 0x4000, 0x0b332c97 )
  1560.     ROM_LOAD( "rbtpg3.bin",   0x0c000, 0x2000, 0x698c06f2 )
  1561.  
  1562.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  1563.     ROM_LOAD( "5788",         0x00000, 0x1000, 0x5c1d0982 )
  1564.     ROM_LOAD( "5787",         0x01000, 0x1000, 0x09e74ed8 )
  1565.     ROM_LOAD( "5786",         0x02000, 0x1000, 0xc3e98284 )
  1566.     ROM_LOAD( "5785",         0x03000, 0x1000, 0xced2fd47 )
  1567.  
  1568.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1569.     ROM_LOAD( "rbtbg1.bin",   0x00000, 0x4000, 0x44dfa483 )
  1570.     ROM_LOAD( "rbtbg0.bin",   0x04000, 0x4000, 0x510b13de )
  1571.  
  1572.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1573.     ROM_LOAD( "rbtfg1.bin",   0x00000, 0x4000, 0x1c0b8791 )
  1574.     ROM_LOAD( "rbtfg0.bin",   0x04000, 0x4000, 0xe99f6018 )
  1575.     ROM_LOAD( "rbtfg3.bin",   0x08000, 0x4000, 0x3e725e77 )
  1576.     ROM_LOAD( "rbtfg2.bin",   0x0c000, 0x4000, 0x4ee8b624 )
  1577.     ROM_LOAD( "rbtfg5.bin",   0x10000, 0x4000, 0x9eeca46e )
  1578.     ROM_LOAD( "rbtfg4.bin",   0x14000, 0x4000, 0x8c79e7d7 )
  1579.     ROM_LOAD( "rbtfg7.bin",   0x18000, 0x4000, 0x8dbf0c36 )
  1580.     ROM_LOAD( "rbtfg6.bin",   0x1c000, 0x4000, 0x441201a0 )
  1581. ROM_END
  1582.  
  1583.  
  1584. ROM_START( timber )
  1585.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1586.     ROM_LOAD( "timpg0.bin",   0x00000, 0x4000, 0x377032ab )
  1587.     ROM_LOAD( "timpg1.bin",   0x04000, 0x4000, 0xfd772836 )
  1588.     ROM_LOAD( "timpg2.bin",   0x08000, 0x4000, 0x632989f9 )
  1589.     ROM_LOAD( "timpg3.bin",   0x0c000, 0x2000, 0xdae8a0dc )
  1590.  
  1591.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  1592.     ROM_LOAD( "tima7.bin",    0x00000, 0x1000, 0xc615dc3e )
  1593.     ROM_LOAD( "tima8.bin",    0x01000, 0x1000, 0x83841c87 )
  1594.     ROM_LOAD( "tima9.bin",    0x02000, 0x1000, 0x22bcdcd3 )
  1595.  
  1596.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1597.     ROM_LOAD( "timbg1.bin",   0x00000, 0x4000, 0xb1cb2651 )
  1598.     ROM_LOAD( "timbg0.bin",   0x04000, 0x4000, 0x2ae352c4 )
  1599.  
  1600.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1601.     ROM_LOAD( "timfg1.bin",   0x00000, 0x4000, 0x81de4a73 )
  1602.     ROM_LOAD( "timfg0.bin",   0x04000, 0x4000, 0x7f3a4f59 )
  1603.     ROM_LOAD( "timfg3.bin",   0x08000, 0x4000, 0x37c03272 )
  1604.     ROM_LOAD( "timfg2.bin",   0x0c000, 0x4000, 0xe2c2885c )
  1605.     ROM_LOAD( "timfg5.bin",   0x10000, 0x4000, 0xeb636216 )
  1606.     ROM_LOAD( "timfg4.bin",   0x14000, 0x4000, 0xb7105eb7 )
  1607.     ROM_LOAD( "timfg7.bin",   0x18000, 0x4000, 0xd9c27475 )
  1608.     ROM_LOAD( "timfg6.bin",   0x1c000, 0x4000, 0x244778e8 )
  1609. ROM_END
  1610.  
  1611.  
  1612. ROM_START( dotron )
  1613.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1614.     ROM_LOAD( "loc-pg0.1c",   0x0000, 0x4000, 0xba0da15f )
  1615.     ROM_LOAD( "loc-pg1.2c",   0x4000, 0x4000, 0xdc300191 )
  1616.     ROM_LOAD( "loc-pg2.3c",   0x8000, 0x4000, 0xab0b3800 )
  1617.     ROM_LOAD( "loc-pg1.4c",   0xc000, 0x2000, 0xf98c9f8e )
  1618.  
  1619.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  1620.     ROM_LOAD( "sound0.a7",    0x00000, 0x1000, 0x6d39bf19 )
  1621.     ROM_LOAD( "sound1.a8",    0x01000, 0x1000, 0xac872e1d )
  1622.     ROM_LOAD( "sound2.a9",    0x02000, 0x1000, 0xe8ef6519 )
  1623.     ROM_LOAD( "sound3.a10",   0x03000, 0x1000, 0x6b5aeb02 )
  1624.  
  1625.     ROM_REGION( 0x10000, REGION_CPU3 )    /* 64k for the audio CPU */
  1626.     ROM_LOAD( "pre.u3",       0x0d000, 0x1000, 0xc3d0f762 )
  1627.     ROM_LOAD( "pre.u4",       0x0e000, 0x1000, 0x7ca79b43 )
  1628.     ROM_LOAD( "pre.u5",       0x0f000, 0x1000, 0x24e9618e )
  1629.  
  1630.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1631.     ROM_LOAD( "loc-bg2.6f",   0x00000, 0x2000, 0x40167124 )
  1632.     ROM_LOAD( "loc-bg1.5f",   0x02000, 0x2000, 0xbb2d7a5d )
  1633.  
  1634.     ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1635.     ROM_LOAD( "loc-g.cp4",    0x00000, 0x2000, 0x57a2b1ff )
  1636.     ROM_LOAD( "loc-h.cp3",    0x02000, 0x2000, 0x3bb4d475 )
  1637.     ROM_LOAD( "loc-e.cp6",    0x04000, 0x2000, 0xce957f1a )
  1638.     ROM_LOAD( "loc-f.cp5",    0x06000, 0x2000, 0xd26053ce )
  1639.     ROM_LOAD( "loc-c.cp8",    0x08000, 0x2000, 0xef45d146 )
  1640.     ROM_LOAD( "loc-d.cp7",    0x0a000, 0x2000, 0x5e8a3ef3 )
  1641.     ROM_LOAD( "loc-a.cp0",    0x0c000, 0x2000, 0xb35f5374 )
  1642.     ROM_LOAD( "loc-b.cp9",    0x0e000, 0x2000, 0x565a5c48 )
  1643. ROM_END
  1644.  
  1645.  
  1646. ROM_START( dotrone )
  1647.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1648.     ROM_LOAD( "loc-cpu1",     0x00000, 0x4000, 0xeee31b8c )
  1649.     ROM_LOAD( "loc-cpu2",     0x04000, 0x4000, 0x75ba6ad3 )
  1650.     ROM_LOAD( "loc-cpu3",     0x08000, 0x4000, 0x94bb1a0e )
  1651.     ROM_LOAD( "loc-cpu4",     0x0c000, 0x2000, 0xc137383c )
  1652.  
  1653.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  1654.     ROM_LOAD( "loc-a",        0x00000, 0x1000, 0x2de6a8a8 )
  1655.     ROM_LOAD( "loc-b",        0x01000, 0x1000, 0x4097663e )
  1656.     ROM_LOAD( "loc-c",        0x02000, 0x1000, 0xf576b9e7 )
  1657.     ROM_LOAD( "loc-d",        0x03000, 0x1000, 0x74b0059e )
  1658.  
  1659.     ROM_REGION( 0x10000, REGION_CPU3 )    /* 64k for the audio CPU */
  1660.     ROM_LOAD( "pre.u3",       0x0d000, 0x1000, 0xc3d0f762 )
  1661.     ROM_LOAD( "pre.u4",       0x0e000, 0x1000, 0x7ca79b43 )
  1662.     ROM_LOAD( "pre.u5",       0x0f000, 0x1000, 0x24e9618e )
  1663.  
  1664.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1665.     ROM_LOAD( "loc-bg2.6f",   0x00000, 0x2000, 0x40167124 )
  1666.     ROM_LOAD( "loc-bg1.5f",   0x02000, 0x2000, 0xbb2d7a5d )
  1667.  
  1668.     ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1669.     ROM_LOAD( "loc-g.cp4",    0x00000, 0x2000, 0x57a2b1ff )
  1670.     ROM_LOAD( "loc-h.cp3",    0x02000, 0x2000, 0x3bb4d475 )
  1671.     ROM_LOAD( "loc-e.cp6",    0x04000, 0x2000, 0xce957f1a )
  1672.     ROM_LOAD( "loc-f.cp5",    0x06000, 0x2000, 0xd26053ce )
  1673.     ROM_LOAD( "loc-c.cp8",    0x08000, 0x2000, 0xef45d146 )
  1674.     ROM_LOAD( "loc-d.cp7",    0x0a000, 0x2000, 0x5e8a3ef3 )
  1675.     ROM_LOAD( "loc-a.cp0",    0x0c000, 0x2000, 0xb35f5374 )
  1676.     ROM_LOAD( "loc-b.cp9",    0x0e000, 0x2000, 0x565a5c48 )
  1677. ROM_END
  1678.  
  1679.  
  1680. ROM_START( destderb )
  1681.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1682.     ROM_LOAD( "dd_pro",       0x00000, 0x4000, 0x8781b367 )
  1683.     ROM_LOAD( "dd_pro1",      0x04000, 0x4000, 0x4c713bfe )
  1684.     ROM_LOAD( "dd_pro2",      0x08000, 0x4000, 0xc2cbd2a4 )
  1685.  
  1686.     ROM_REGION( 0x10000, REGION_CPU2 )  /* 64k for the Turbo Cheap Squeak */
  1687.     ROM_LOAD( "tcs_u5.bin",   0x0c000, 0x2000, 0xeca33b2c )
  1688.     ROM_LOAD( "tcs_u4.bin",   0x0e000, 0x2000, 0x3490289a )
  1689.  
  1690.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1691.     ROM_LOAD( "dd_bg0.6f",    0x00000, 0x2000, 0xcf80be19 )
  1692.     ROM_LOAD( "dd_bg1.5f",    0x02000, 0x2000, 0x4e173e52 )
  1693.  
  1694.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1695.     ROM_LOAD( "dd_fg-0.a4",   0x00000, 0x4000, 0xe57a4de6 )
  1696.     ROM_LOAD( "dd_fg-4.a3",   0x04000, 0x4000, 0x55aa667f )
  1697.     ROM_LOAD( "dd_fg-1.a6",   0x08000, 0x4000, 0x70259651 )
  1698.     ROM_LOAD( "dd_fg-5.a5",   0x0c000, 0x4000, 0x5fe99007 )
  1699.     ROM_LOAD( "dd_fg-2.a8",   0x10000, 0x4000, 0x6cab7b95 )
  1700.     ROM_LOAD( "dd_fg-6.a7",   0x14000, 0x4000, 0xabfb9a8b )
  1701.     ROM_LOAD( "dd_fg-3.a10",  0x18000, 0x4000, 0x801d9b86 )
  1702.     ROM_LOAD( "dd_fg-7.a9",   0x1c000, 0x4000, 0x0ec3f60a )
  1703. ROM_END
  1704.  
  1705.  
  1706. ROM_START( destderm )
  1707.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1708.     ROM_LOAD( "pro0.3b",      0x00000, 0x8000, 0x2e24527b )
  1709.     ROM_LOAD( "pro1.5b",      0x08000, 0x8000, 0x034c00fc )
  1710.  
  1711.     ROM_REGION( 0x10000, REGION_CPU2 )  /* 64k for the Turbo Cheap Squeak */
  1712.     ROM_LOAD( "tcs_u5.bin",   0x0c000, 0x2000, 0xeca33b2c )
  1713.     ROM_LOAD( "tcs_u4.bin",   0x0e000, 0x2000, 0x3490289a )
  1714.  
  1715.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1716.     ROM_LOAD( "bg0.15a",      0x00000, 0x2000, 0xa35d13b8 )
  1717.     ROM_LOAD( "bg1.14b",      0x02000, 0x2000, 0x22ca93f3 )
  1718.  
  1719.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1720.     ROM_LOAD( "dd_fg-0.a4",   0x00000, 0x4000, 0xe57a4de6 )
  1721.     ROM_LOAD( "dd_fg-4.a3",   0x04000, 0x4000, 0x55aa667f )
  1722.     ROM_LOAD( "dd_fg-1.a6",   0x08000, 0x4000, 0x70259651 )
  1723.     ROM_LOAD( "dd_fg-5.a5",   0x0c000, 0x4000, 0x5fe99007 )
  1724.     ROM_LOAD( "dd_fg-2.a8",   0x10000, 0x4000, 0x6cab7b95 )
  1725.     ROM_LOAD( "dd_fg-6.a7",   0x14000, 0x4000, 0xabfb9a8b )
  1726.     ROM_LOAD( "dd_fg-3.a10",  0x18000, 0x4000, 0x801d9b86 )
  1727.     ROM_LOAD( "dd_fg-7.a9",   0x1c000, 0x4000, 0x0ec3f60a )
  1728. ROM_END
  1729.  
  1730.  
  1731. ROM_START( sarge )
  1732.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1733.     ROM_LOAD( "cpu_3b.bin",   0x0000, 0x8000, 0xda31a58f )
  1734.     ROM_LOAD( "cpu_5b.bin",   0x8000, 0x8000, 0x6800e746 )
  1735.  
  1736.     ROM_REGION( 0x10000, REGION_CPU2 )  /* 64k for the Turbo Cheap Squeak */
  1737.     ROM_LOAD( "tcs_u5.bin",   0xc000, 0x2000, 0xa894ef8a )
  1738.     ROM_LOAD( "tcs_u4.bin",   0xe000, 0x2000, 0x6ca6faf3 )
  1739.  
  1740.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1741.     ROM_LOAD( "til_15a.bin",  0x00000, 0x2000, 0x685001b8 )
  1742.     ROM_LOAD( "til_14b.bin",  0x02000, 0x2000, 0x8449eb45 )
  1743.  
  1744.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1745.     ROM_LOAD( "spr_8e.bin",   0x00000, 0x8000, 0x93fac29d )
  1746.     ROM_LOAD( "spr_6e.bin",   0x08000, 0x8000, 0x7cc6fb28 )
  1747.     ROM_LOAD( "spr_5e.bin",   0x10000, 0x8000, 0xc832375c )
  1748.     ROM_LOAD( "spr_4e.bin",   0x18000, 0x8000, 0xc382267d )
  1749. ROM_END
  1750.  
  1751.  
  1752. ROM_START( rampage )
  1753.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1754.     ROM_LOAD( "pro0rev3.3b",  0x00000, 0x08000, 0x2f7ca03c )
  1755.     ROM_LOAD( "pro1rev3.5b",  0x08000, 0x08000, 0xd89bd9a4 )
  1756.  
  1757.     ROM_REGION( 0x20000, REGION_CPU2 )  /* 128k for the Sounds Good board */
  1758.     ROM_LOAD_EVEN( "ramp_u7.snd",  0x00000, 0x8000, 0xcffd7fa5 )    /* these are Revision 2 sound ROMs */
  1759.     ROM_LOAD_ODD ( "ramp_u17.snd", 0x00000, 0x8000, 0xe92c596b )
  1760.     ROM_LOAD_EVEN( "ramp_u8.snd",  0x10000, 0x8000, 0x11f787e4 )
  1761.     ROM_LOAD_ODD ( "ramp_u18.snd", 0x10000, 0x8000, 0x6b8bf5e1 )
  1762.  
  1763.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1764.     ROM_LOAD( "bg-0",         0x00000, 0x04000, 0xc0d8b7a5 )
  1765.     ROM_LOAD( "bg-1",         0x04000, 0x04000, 0x2f6e3aa1 )
  1766.  
  1767.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1768.     ROM_LOAD( "fg-0",         0x00000, 0x10000, 0x0974be5d )
  1769.     ROM_LOAD( "fg-1",         0x10000, 0x10000, 0x8728532b )
  1770.     ROM_LOAD( "fg-2",         0x20000, 0x10000, 0x9489f714 )
  1771.     ROM_LOAD( "fg-3",         0x30000, 0x10000, 0x81e1de40 )
  1772. ROM_END
  1773.  
  1774.  
  1775. ROM_START( rampage2 )
  1776.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1777.     ROM_LOAD( "pro0rev2.3b",  0x0000, 0x8000, 0x3f1d0293 )
  1778.     ROM_LOAD( "pro1rev2.5b",  0x8000, 0x8000, 0x58523d75 )
  1779.  
  1780.     ROM_REGION( 0x20000, REGION_CPU2 )  /* 128k for the Sounds Good board */
  1781.     ROM_LOAD_EVEN( "ramp_u7.snd",  0x00000, 0x8000, 0xcffd7fa5 )    /* these are Revision 2 sound ROMs */
  1782.     ROM_LOAD_ODD ( "ramp_u17.snd", 0x00000, 0x8000, 0xe92c596b )
  1783.     ROM_LOAD_EVEN( "ramp_u8.snd",  0x10000, 0x8000, 0x11f787e4 )
  1784.     ROM_LOAD_ODD ( "ramp_u18.snd", 0x10000, 0x8000, 0x6b8bf5e1 )
  1785.  
  1786.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1787.     ROM_LOAD( "bg-0",         0x00000, 0x04000, 0xc0d8b7a5 )
  1788.     ROM_LOAD( "bg-1",         0x04000, 0x04000, 0x2f6e3aa1 )
  1789.  
  1790.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1791.     ROM_LOAD( "fg-0",         0x00000, 0x10000, 0x0974be5d )
  1792.     ROM_LOAD( "fg-1",         0x10000, 0x10000, 0x8728532b )
  1793.     ROM_LOAD( "fg-2",         0x20000, 0x10000, 0x9489f714 )
  1794.     ROM_LOAD( "fg-3",         0x30000, 0x10000, 0x81e1de40 )
  1795. ROM_END
  1796.  
  1797.  
  1798. ROM_START( powerdrv )
  1799.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1800.     ROM_LOAD( "pdrv3b.bin",   0x0000, 0x8000, 0xd870b704 )
  1801.     ROM_LOAD( "pdrv5b.bin",   0x8000, 0x8000, 0xfa0544ad )
  1802.  
  1803.     ROM_REGION( 0x20000, REGION_CPU2 )  /* 128k for the Sounds Good board */
  1804.     ROM_LOAD_EVEN( "pdsndu7.bin",  0x00000, 0x8000, 0x78713e78 )
  1805.     ROM_LOAD_ODD ( "pdsndu17.bin", 0x00000, 0x8000, 0xc41de6e4 )
  1806.     ROM_LOAD_EVEN( "pdsndu8.bin",  0x10000, 0x8000, 0x15714036 )
  1807.     ROM_LOAD_ODD ( "pdsndu18.bin", 0x10000, 0x8000, 0xcae14c70 )
  1808.  
  1809.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1810.     ROM_LOAD( "pdrv15a.bin",  0x00000, 0x04000, 0xb858b5a8 )
  1811.     ROM_LOAD( "pdrv14b.bin",  0x04000, 0x04000, 0x12ee7fc2 )
  1812.  
  1813.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1814.     ROM_LOAD( "pdrv8e.bin",   0x00000, 0x10000, 0xdd3a2adc )
  1815.     ROM_LOAD( "pdrv6e.bin",   0x10000, 0x10000, 0x1a1f7f81 )
  1816.     ROM_LOAD( "pdrv5e.bin",   0x20000, 0x10000, 0x4cb4780e )
  1817.     ROM_LOAD( "pdrv4e.bin",   0x30000, 0x10000, 0xde400335 )
  1818. ROM_END
  1819.  
  1820.  
  1821. ROM_START( maxrpm )
  1822.     ROM_REGION( 0x12000, REGION_CPU1 )    /* 64k for code */
  1823.     ROM_LOAD( "pro.0",        0x00000, 0x8000, 0x3f9ec35f )
  1824.     ROM_LOAD( "pro.1",        0x08000, 0x6000, 0xf628bb30 )
  1825.     ROM_CONTINUE(             0x10000, 0x2000 )    /* unused? but there seems to be stuff in here */
  1826.                                 /* loading it at e000 causes rogue sprites to appear on screen */
  1827.  
  1828.     ROM_REGION( 0x10000, REGION_CPU2 )  /* 64k for the Turbo Cheap Squeak */
  1829.     ROM_LOAD( "turbskwk.u5",   0x8000, 0x4000, 0x55c3b759 )
  1830.     ROM_LOAD( "turbskwk.u4",   0xc000, 0x4000, 0x31a2da2e )
  1831.  
  1832.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1833.     ROM_LOAD( "bg-0",         0x00000, 0x4000, 0xe3fb693a )
  1834.     ROM_LOAD( "bg-1",         0x04000, 0x4000, 0x50d1db6c )
  1835.  
  1836.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1837.     ROM_LOAD( "fg-0",         0x00000, 0x8000, 0x1d1435c1 )
  1838.     ROM_LOAD( "fg-1",         0x08000, 0x8000, 0xe54b7f2a )
  1839.     ROM_LOAD( "fg-2",         0x10000, 0x8000, 0x38be8505 )
  1840.     ROM_LOAD( "fg-3",         0x18000, 0x8000, 0x9ae3eb52 )
  1841. ROM_END
  1842.  
  1843.  
  1844. ROM_START( spyhunt )
  1845.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1846.     ROM_LOAD( "cpu_pg0.6d",   0x0000, 0x2000, 0x1721b88f )
  1847.     ROM_LOAD( "cpu_pg1.7d",   0x2000, 0x2000, 0x909d044f )
  1848.     ROM_LOAD( "cpu_pg2.8d",   0x4000, 0x2000, 0xafeeb8bd )
  1849.     ROM_LOAD( "cpu_pg3.9d",   0x6000, 0x2000, 0x5e744381 )
  1850.     ROM_LOAD( "cpu_pg4.10d",  0x8000, 0x2000, 0xa3033c15 )
  1851.     ROM_LOAD( "cpu_pg5.11d",  0xa000, 0x4000, 0x88aa1e99 )
  1852.  
  1853.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  1854.     ROM_LOAD( "snd_0sd.a8",   0x0000, 0x1000, 0xc95cf31e )
  1855.     ROM_LOAD( "snd_1sd.a7",   0x1000, 0x1000, 0x12aaa48e )
  1856.  
  1857.     ROM_REGION( 0x8000, REGION_CPU3 )  /* 32k for the Chip Squeak Deluxe */
  1858.     ROM_LOAD_EVEN( "csd_u7a.u7",   0x00000, 0x2000, 0x6e689fe7 )
  1859.     ROM_LOAD_ODD ( "csd_u17b.u17", 0x00000, 0x2000, 0x0d9ddce6 )
  1860.     ROM_LOAD_EVEN( "csd_u8c.u8",   0x04000, 0x2000, 0x35563cd0 )
  1861.     ROM_LOAD_ODD ( "csd_u18d.u18", 0x04000, 0x2000, 0x63d3f5b1 )
  1862.  
  1863.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1864.     ROM_LOAD( "cpu_bg0.3a",   0x00000, 0x2000, 0xdea34fed )
  1865.     ROM_LOAD( "cpu_bg1.4a",   0x02000, 0x2000, 0x8f64525f )
  1866.     ROM_LOAD( "cpu_bg2.5a",   0x04000, 0x2000, 0xba0fd626 )
  1867.     ROM_LOAD( "cpu_bg3.6a",   0x06000, 0x2000, 0x7b482d61 )
  1868.  
  1869.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1870.     ROM_LOAD( "vid_0fg.a8",   0x00000, 0x4000, 0x292c5466 )
  1871.     ROM_LOAD( "vid_1fg.a7",   0x04000, 0x4000, 0x9fe286ec )
  1872.     ROM_LOAD( "vid_2fg.a6",   0x08000, 0x4000, 0x62c8bfa5 )
  1873.     ROM_LOAD( "vid_3fg.a5",   0x0c000, 0x4000, 0xb894934d )
  1874.     ROM_LOAD( "vid_4fg.a4",   0x10000, 0x4000, 0x7ca4941b )
  1875.     ROM_LOAD( "vid_5fg.a3",   0x14000, 0x4000, 0x2d9fbcec )
  1876.     ROM_LOAD( "vid_6fg.a2",   0x18000, 0x4000, 0x8cb8a066 )
  1877.     ROM_LOAD( "vid_7fg.a1",   0x1c000, 0x4000, 0x940fe17e )
  1878.  
  1879.     ROM_REGION( 0x01000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1880.     ROM_LOAD( "cpu_alph.10g", 0x00000, 0x1000, 0x936dc87f )
  1881. ROM_END
  1882.  
  1883.  
  1884. ROM_START( turbotag )
  1885.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1886.     ROM_LOAD( "ttprog0.bin",  0x0000, 0x2000, 0x6110fd80 )
  1887.     ROM_LOAD( "ttprog1.bin",  0x2000, 0x2000, BADCRC( 0xb0505e18 ))
  1888.     ROM_LOAD( "ttprog2.bin",  0x4000, 0x2000, 0xc4141237 )
  1889.     ROM_LOAD( "ttprog3.bin",  0x6000, 0x2000, 0xaf294c6e )
  1890.     ROM_LOAD( "ttprog4.bin",  0x8000, 0x2000, 0x8c5bc1a4 )
  1891.     ROM_LOAD( "ttprog5.bin",  0xa000, 0x2000, 0x11e62fe4 )
  1892.     ROM_RELOAD(               0xc000, 0x2000 )
  1893.  
  1894.     ROM_REGION( 0x8000, REGION_CPU2 )  /* 32k for the Chip Squeak Deluxe */
  1895.     ROM_LOAD_EVEN( "ttu7.bin",  0x00000, 0x2000, 0x8ebb3302 )
  1896.     ROM_LOAD_ODD ( "ttu17.bin", 0x00000, 0x2000, 0x605d6c74 )
  1897.     ROM_LOAD_EVEN( "ttu8.bin",  0x04000, 0x2000, 0x6bfcb22a )
  1898.     ROM_LOAD_ODD ( "ttu18.bin", 0x04000, 0x2000, 0xbb25852c )
  1899.  
  1900.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1901.     ROM_LOAD( "ttbg0.bin",    0x00000, 0x2000, 0x1cd2023f )
  1902.     ROM_LOAD( "ttbg1.bin",    0x02000, 0x2000, 0x784e84cd )
  1903.     ROM_LOAD( "ttbg2.bin",    0x04000, 0x2000, 0xda9d47d2 )
  1904.     ROM_LOAD( "ttbg3.bin",    0x06000, 0x2000, 0x367e06a5 )
  1905.  
  1906.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1907.     ROM_LOAD( "ttfg0.bin",    0x00000, 0x4000, 0xed69e1a8 )
  1908.     ROM_LOAD( "ttfg1.bin",    0x04000, 0x4000, 0x9d7e6ebc )
  1909.     ROM_LOAD( "ttfg2.bin",    0x08000, 0x4000, 0x037ec6fc )
  1910.     ROM_LOAD( "ttfg3.bin",    0x0c000, 0x4000, 0x74e21c1c )
  1911.     ROM_LOAD( "ttfg4.bin",    0x10000, 0x4000, 0x6fdb0c13 )
  1912.     ROM_LOAD( "ttfg5.bin",    0x14000, 0x4000, 0x8b718879 )
  1913.     ROM_LOAD( "ttfg6.bin",    0x18000, 0x4000, 0x4094e996 )
  1914.     ROM_LOAD( "ttfg7.bin",    0x1c000, 0x4000, 0x212019dc )
  1915.  
  1916.     ROM_REGION( 0x01000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1917.     ROM_LOAD( "ttan.bin",     0x00000, 0x1000, 0xaa0b1471 )
  1918. ROM_END
  1919.  
  1920.  
  1921. ROM_START( crater )
  1922.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1923.     ROM_LOAD( "crcpu.6d",     0x0000, 0x2000, 0xad31f127 )
  1924.     ROM_LOAD( "crcpu.7d",     0x2000, 0x2000, 0x3743c78f )
  1925.     ROM_LOAD( "crcpu.8d",     0x4000, 0x2000, 0xc95f9088 )
  1926.     ROM_LOAD( "crcpu.9d",     0x6000, 0x2000, 0xa03c4b11 )
  1927.     ROM_LOAD( "crcpu.10d",    0x8000, 0x2000, 0x44ae4cbd )
  1928.  
  1929.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  1930.     ROM_LOAD( "crsnd4.a7",    0x0000, 0x1000, 0xfd666cb5 )
  1931.     ROM_LOAD( "crsnd1.a8",    0x1000, 0x1000, 0x90bf2c4c )
  1932.     ROM_LOAD( "crsnd2.a9",    0x2000, 0x1000, 0x3b8deef1 )
  1933.     ROM_LOAD( "crsnd3.a10",   0x3000, 0x1000, 0x05803453 )
  1934.  
  1935.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1936.     ROM_LOAD( "crcpu.3a",     0x00000, 0x2000, 0x9d73504a )
  1937.     ROM_LOAD( "crcpu.4a",     0x02000, 0x2000, 0x42a47dff )
  1938.     ROM_LOAD( "crcpu.5a",     0x04000, 0x2000, 0x2fe4a6e1 )
  1939.     ROM_LOAD( "crcpu.6a",     0x06000, 0x2000, 0xd0659042 )
  1940.  
  1941.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1942.     ROM_LOAD( "crvid.a3",     0x00000, 0x4000, 0x2c2f5b29 )
  1943.     ROM_LOAD( "crvid.a4",     0x04000, 0x4000, 0x579a8e36 )
  1944.     ROM_LOAD( "crvid.a5",     0x08000, 0x4000, 0x9bdec312 )
  1945.     ROM_LOAD( "crvid.a6",     0x0c000, 0x4000, 0x5bf954e0 )
  1946.     ROM_LOAD( "crvid.a7",     0x10000, 0x4000, 0x9fa307d5 )
  1947.     ROM_LOAD( "crvid.a8",     0x14000, 0x4000, 0x4b913498 )
  1948.     ROM_LOAD( "crvid.a9",     0x18000, 0x4000, 0x811f152d )
  1949.     ROM_LOAD( "crvid.a10",    0x1c000, 0x4000, 0x7a22d6bc )
  1950.  
  1951.     ROM_REGION( 0x01000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1952.     ROM_LOAD( "crcpu.10g",    0x00000, 0x1000, 0x6fe53c8d )
  1953. ROM_END
  1954.  
  1955.  
  1956.  
  1957. /*************************************
  1958.  *
  1959.  *    Driver initialization
  1960.  *
  1961.  *************************************/
  1962.  
  1963. static void mcrmono_decode(void)
  1964. {
  1965.     int i;
  1966.  
  1967.     /* Rampage tile graphics are inverted */
  1968.     for (i = 0; i < memory_region_length(REGION_GFX1); i++)
  1969.         memory_region(REGION_GFX1)[i] ^= 0xff;
  1970. }
  1971.  
  1972.  
  1973. static void spyhunt_decode(void)
  1974. {
  1975.     unsigned char *RAM = memory_region(REGION_CPU1);
  1976.  
  1977.     /* some versions of rom 11d have the top and bottom 8k swapped; to enable us to work with either
  1978.        a correct set or a swapped set (both of which pass the checksum!), we swap them here */
  1979.     if (RAM[0xa000] != 0x0c)
  1980.     {
  1981.         int i;
  1982.  
  1983.         for (i = 0; i < 0x2000; i++)
  1984.         {
  1985.             UINT8 temp = RAM[0xa000 + i];
  1986.             RAM[0xa000 + i] = RAM[0xc000 + i];
  1987.             RAM[0xc000 + i] = temp;
  1988.         }
  1989.     }
  1990. }
  1991.  
  1992.  
  1993. static void init_tapper(void)
  1994. {
  1995.     MCR_CONFIGURE_SOUND(MCR_SSIO);
  1996. }
  1997.  
  1998.  
  1999. static void init_timber(void)
  2000. {
  2001.     MCR_CONFIGURE_SOUND(MCR_SSIO);
  2002.  
  2003.     /* Timber uses a modified SSIO with RAM in place of one of the ROMs */
  2004.     install_mem_read_handler(1, 0x3000, 0x3fff, MRA_RAM);
  2005.     install_mem_write_handler(1, 0x3000, 0x3fff, MWA_RAM);
  2006. }
  2007.  
  2008.  
  2009. static void init_dotron(void)
  2010. {
  2011.     MCR_CONFIGURE_SOUND(MCR_SSIO | MCR_SQUAWK_N_TALK);
  2012.     install_port_read_handler(0, 0x02, 0x02, dotron_port_2_r);
  2013.     install_port_write_handler(0, 0x04, 0x04, dotron_port_4_w);
  2014. }
  2015.  
  2016.  
  2017. static void init_destderb(void)
  2018. {
  2019.     MCR_CONFIGURE_SOUND(MCR_TURBO_CHIP_SQUEAK);
  2020.     install_port_write_handler(0, 0x04, 0x04, turbocs_data_w);
  2021. }
  2022.  
  2023.  
  2024. static void init_destderm(void)
  2025. {
  2026.     MCR_CONFIGURE_SOUND(MCR_TURBO_CHIP_SQUEAK);
  2027.     install_port_write_handler(0, 0x06, 0x06, turbocs_data_w);
  2028.     mcrmono_decode();
  2029. }
  2030.  
  2031.  
  2032. static void init_sarge(void)
  2033. {
  2034.     MCR_CONFIGURE_SOUND(MCR_TURBO_CHIP_SQUEAK);
  2035.     install_port_read_handler(0, 0x01, 0x01, sarge_port_1_r);
  2036.     install_port_read_handler(0, 0x02, 0x02, sarge_port_2_r);
  2037.     install_port_write_handler(0, 0x06, 0x06, turbocs_data_w);
  2038.     mcrmono_decode();
  2039. }
  2040.  
  2041.  
  2042. static void init_rampage(void)
  2043. {
  2044.     MCR_CONFIGURE_SOUND(MCR_SOUNDS_GOOD);
  2045.     install_port_write_handler(0, 0x06, 0x06, soundsgood_data_w);
  2046.     mcrmono_decode();
  2047. }
  2048.  
  2049.  
  2050. static void init_powerdrv(void)
  2051. {
  2052.     MCR_CONFIGURE_SOUND(MCR_SOUNDS_GOOD);
  2053.     install_port_read_handler(0, 0x02, 0x02, powerdrv_port_2_r);
  2054.     install_port_write_handler(0, 0x06, 0x06, soundsgood_data_w);
  2055.     install_port_write_handler(0, 0x07, 0x07, powerdrv_port_7_w);
  2056.     mcrmono_decode();
  2057. }
  2058.  
  2059.  
  2060. static void init_maxrpm(void)
  2061. {
  2062.     MCR_CONFIGURE_SOUND(MCR_TURBO_CHIP_SQUEAK);
  2063.     install_port_read_handler(0, 0x01, 0x01, maxrpm_port_1_r);
  2064.     install_port_read_handler(0, 0x02, 0x02, maxrpm_port_2_r);
  2065.     install_port_write_handler(0, 0x05, 0x05, maxrpm_mux_w);
  2066.     install_port_write_handler(0, 0x06, 0x06, turbocs_data_w);
  2067.     mcrmono_decode();
  2068. }
  2069.  
  2070.  
  2071. static void init_spyhunt(void)
  2072. {
  2073.     MCR_CONFIGURE_SOUND(MCR_SSIO | MCR_CHIP_SQUEAK_DELUXE);
  2074.     install_port_read_handler(0, 0x02, 0x02, spyhunt_port_2_r);
  2075.     install_port_write_handler(0, 0x04, 0x04, spyhunt_port_4_w);
  2076.  
  2077.     spyhunt_sprite_color_mask = 0x00;
  2078.     spyhunt_scroll_offset = -16;
  2079.     spyhunt_draw_lamps = 1;
  2080.  
  2081.     spyhunt_decode();
  2082. }
  2083.  
  2084.  
  2085. static void init_turbotag(void)
  2086. {
  2087.     MCR_CONFIGURE_SOUND(MCR_CHIP_SQUEAK_DELUXE);
  2088.     install_port_read_handler(0, 0x02, 0x02, spyhunt_port_2_r);
  2089.     install_port_write_handler(0, 0x04, 0x04, spyhunt_port_4_w);
  2090.  
  2091.     spyhunt_sprite_color_mask = 0x00;
  2092.     spyhunt_scroll_offset = -88;
  2093.     spyhunt_draw_lamps = 0;
  2094.  
  2095.     /* kludge for bad ROM read */
  2096.     install_mem_read_handler(0, 0x0b53, 0x0b53, turbotag_kludge_r);
  2097. }
  2098.  
  2099.  
  2100. static void init_crater(void)
  2101. {
  2102.     MCR_CONFIGURE_SOUND(MCR_SSIO);
  2103.  
  2104.     spyhunt_sprite_color_mask = 0x03;
  2105.     spyhunt_scroll_offset = -96;
  2106.     spyhunt_draw_lamps = 0;
  2107. }
  2108.  
  2109.  
  2110.  
  2111. /*************************************
  2112.  *
  2113.  *    Game drivers
  2114.  *
  2115.  *************************************/
  2116.  
  2117. GAME( 1983, tapper,   0,        mcr3,     tapper,   tapper,   ROT0,  "Bally Midway", "Tapper (Budweiser)" )
  2118. GAME( 1983, tappera,  tapper,   mcr3,     tapper,   tapper,   ROT0,  "Bally Midway", "Tapper (alternate)" )
  2119. GAME( 1983, sutapper, tapper,   mcr3,     tapper,   tapper,   ROT0,  "Bally Midway", "Tapper (Suntory)" )
  2120. GAME( 1984, rbtapper, tapper,   mcr3,     tapper,   tapper,   ROT0,  "Bally Midway", "Tapper (Root Beer)" )
  2121. GAME( 1984, timber,   0,        mcr3,     timber,   timber,   ROT0,  "Bally Midway", "Timber" )
  2122. GAME( 1983, dotron,   0,        dotron,   dotron,   dotron,   ORIENTATION_FLIP_X, "Bally Midway", "Discs of Tron (Upright)" )
  2123. GAME( 1983, dotrone,  dotron,   dotron,   dotron,   dotron,   ORIENTATION_FLIP_X, "Bally Midway", "Discs of Tron (Environmental)" )
  2124. GAME( 1984, destderb, 0,        destderb, destderb, destderb, ROT0,  "Bally Midway", "Demolition Derby" )
  2125. GAME( 1984, destderm, destderb, sarge,    destderb, destderm, ROT0,  "Bally Midway", "Demolition Derby (2-Player Mono Board Version)" )
  2126. GAME( 1985, sarge,    0,        sarge,    sarge,    sarge,    ROT0,  "Bally Midway", "Sarge" )
  2127. GAME( 1986, rampage,  0,        rampage,  rampage,  rampage,  ROT0,  "Bally Midway", "Rampage (revision 3)" )
  2128. GAME( 1986, rampage2, rampage,  rampage,  rampage,  rampage,  ROT0,  "Bally Midway", "Rampage (revision 2)" )
  2129. GAME( 1986, powerdrv, 0,        powerdrv, powerdrv, powerdrv, ROT0,  "Bally Midway", "Power Drive" )
  2130. GAME( 1986, maxrpm,   0,        sarge,    maxrpm,   maxrpm,   ROT0,  "Bally Midway", "Max RPM" )
  2131. GAME( 1983, spyhunt,  0,        spyhunt,  spyhunt,  spyhunt,  ROT90, "Bally Midway", "Spy Hunter" )
  2132. GAME( 1985, turbotag, 0,        turbotag, turbotag, turbotag, ROT90, "Bally Midway", "Turbo Tag (Prototype)" )
  2133. GAME( 1984, crater,   0,        crater,   crater,   crater,   ORIENTATION_FLIP_X, "Bally Midway", "Crater Raider" )
  2134.